/*
 * CArea.cpp
 *
 *  Created on: 11 Oct 2012
 *      Author: Mario Kleinsasser
 *		Time:	19:31:41
 */

#include "CArea.h"
#include <iostream>
#include "CItem.h"
#include "CEmpty.h"
using namespace std;

CArea::CArea() {
	/* constructor set all NULL
	 * and also instantiate the type field of us with a empty CFeld (needed for printing)
	 */
	north=south=west=east = NULL;
	this->itemList.push_back(new CEmpty);

	/* set pheromone 0*/
	this->pheromone = 0;

	//this->type = new CEmpty();

}

CArea::~CArea() {
}

CArea* CArea::getEast(){
	return this->east;
}

void CArea::setEast(CArea* east){
	this->east = east;
}

CArea* CArea::getNorth(){
	return this->north;
}

void CArea::setNorth(CArea* north){
	this->north = north;
}

CArea* CArea::getSouth(){
	return this->south;
}

void CArea::setSouth(CArea* south){
	this->south = south;
}

CArea* CArea::getWest(){
	return this->west;
}

void CArea::setWest(CArea* west){
	this->west = west;
}

/* Comment */

void CArea::addItemToList(CItem* item){
//	list<CItem*>::iterator it;
//	for(it = this->itemList.begin(); it != this->itemList.end(); it++ ){
//		CEmpty *e = dynamic_cast<CEmpty *>((*it));
//		if(e != NULL){
//			this->itemList.remove(e);
//			break;
//		}
//	}
	this->itemList.push_front(item);
}

//CItem *CArea::getType(){
//	return this->type;
//}
//
//void CArea::setType(CItem *type){
//	this->type = type;
//}


